feat(desktop): wire the Skills screen + resolve cli_path from PATH#126
Merged
Conversation
Unstubs `window.deepcode.skills.list()` (was []), completing the desktop Plugins+Skills pair. Built-in skills are now bundled into the .app as a resource so the renderer (which can't run core's node:fs loadSkills) can list them via Rust. - tauri.conf.json: bundle `packages/core/skills` → `<Resources>/skills`. - commands.rs `list_skills(app, cwd?)`: built-in from the Tauri resource dir + user (~/.deepcode/skills) + project (<cwd>/.deepcode/skills). Pure `collect_skills(builtin, user, project)` + `parse_skill_frontmatter` (reads name/description from the `---` block) so it's cargo-tested; each row carries the SKILL.md body for the detail pane. camelCase serde (§8a). - cli_path(): now resolves a globally-installed `deepcode` on PATH (was always None) — useful for "drop into the CLI"; bundling the CLI itself stays future. - tauri-api.ts listSkills(cwd) + SkillInfo; window-shim skills.list()/body() call it with the picked project path. Tests: +4 Rust (frontmatter parse ×2, SkillInfo camelCase, collect_skills across builtin/user/project + sort), +1 renderer (list_skills cmd + cwd). Rust 16 green (cargo), desktop 28 green. Note: the built-in resource path resolves in a packaged .app; cargo tests cover the pure collector/parser, but the bundled resource_dir lookup is only runtime-exercised on a real `tauri build` (not in this CI, which is JS-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unstubs
window.deepcode.skills.list()(was[]), completing the desktop Plugins + Skills pair. Built-in skills are now bundled into the.appas a resource so the renderer (which can't run core'snode:fsloadSkills) can list them via Rust.Changes
tauri.conf.json:bundle.resourcescopiespackages/core/skills→<Resources>/skills.commands.rslist_skills(app, cwd?): built-in from the Tauri resource dir + user (~/.deepcode/skills) + project (<cwd>/.deepcode/skills). The purecollect_skills(builtin, user, project)+parse_skill_frontmatter(extractsname/descriptionfrom the---block) are cargo-tested; each row carries theSKILL.mdbody for the detail pane. camelCase serde (§8a).cli_path(): now resolves a globally-installeddeepcodeon PATH (was alwaysNone) — useful for the "drop into CLI" affordance. Bundling the CLI binary itself stays future work.tauri-api.tslistSkills(cwd)+SkillInfo;window-shim.tsskills.list()/body()call it with the picked project path (loadProjectPath()).Tests
cargo test, 16 green): frontmatter parse (with/without fence),SkillInfocamelCase contract,collect_skillsacross builtin/user/project + name sort.tauri-api.test.ts, desktop 28 green):list_skillscommand name +cwdarg.Verification boundary
The pure collector + parser are unit-tested;
cli_pathPATH resolution is straightforward. The bundledresource_dir()lookup only resolves in a packagedtauri build— not exercised in this CI (JS-only) ortauri dev. The config + API usage are standard Tauri 2.🤖 Generated with Claude Code